import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Index from '@/components/pages/index'
import Layout from '@/components/Layout'
import VueResource from 'vue-resource'
import Detail from '@/components/pages/detail'
import AnalysisPage from '@/components/pages/detail/analysis'
import CountPage from '@/components/pages/detail/count'
import PublishPage from '@/components/pages/detail/publish'
import ForecastPage from '@/components/pages/detail/forecast'
import OrderList from '@/components/orderList'
import AxiosTest from '@/components/axiosTest'

Vue.use(Router);
Vue.use(VueResource);

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index
    },
    {
      path: '/hello',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path:'/axios',
      name:'AxiosTest',
      component:AxiosTest
    },
    {
      path:'/orderList',
      name:OrderList,
      component:OrderList
    },
    {
      path:'/detail',
      name:'Detail',
      component:Detail,
      children:[
        {
          path: 'analysis',
          name: 'AnalysisPage',
          component: AnalysisPage
        },
        {
          path:'publish',
          name:'publish',
          component:PublishPage
        },
        {
          path: 'count',
          name: 'CountPage',
          component: CountPage
        },
        {
          path: 'forecast',
          name: 'ForecastPage',
          component: ForecastPage
        },

      ]
    },
  ]
})
